<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button class="btn">听我的</button>
    <script>
        var flag = true;
        var clos = true;
       var btn = document.getElementsByClassName("btn")[0]
       btn.onclick = function(){
        flag = !flag;
        clos = !clos;
        var abc = `我叫${flag?'秦文晖':'吊毛'};我是旁边的${clos?'儿子':'孙子'}`
        alert(abc)
       }
       
    </script>
</body>
</html>